#ifndef __TPLAYCONTROLBAR_H__
#define __TPLAYCONTROLBAR_H__

#include "stdafx.h"
#define CONTROLBAR_HEIGHT 30
class TPlayControlBar : public QWidget
{
    Q_OBJECT
public:
    enum DurationType
    {
        DT_Time,
        DT_Frame
    };
public:
    TPlayControlBar(QWidget* parent);
    ~TPlayControlBar();
    void SetDurationType(DurationType dt);
signals:
    void PlayPause();
    void Stop();
    void Seek(int);
    void ChangeVolume(int volume);
public slots:
    void SetDuration(int duration);
    void SetCurrentPosition(int pos);
    void SetCurrentVolume(int volume);
    void OnPlayPause(bool bPlay);
protected:
    QWidget *m_mainWindow;
    QSlider *m_playSlider;
    QLabel *m_timeLabel;
    QAbstractButton *m_stopButton;
    QAbstractButton *m_playButton;
    QAbstractButton *m_muteButton;
    QAbstractSlider *m_volumeSlider;
    QAbstractButton *m_fullScreenButton;

    DurationType m_dType;
};

#endif //__TPLAYCONTROLBAR_H__
